package com.wxy.test2.decoratorpattern;

public class Client {
    public static void main(String[] args) {
        Component window = new Window();
        //Component listBox = new ListBox();
        //Component textBox = new TextBox();

        System.out.println("向窗体新增功能1：滚动条");
        Component scrollBar = new ScrollBarDecorator(window);
        scrollBar.display();

        System.out.println();

        System.out.println("向窗体新增功能2：透明窗体");
        Component transparentForm = new TransparentFormDecorator(scrollBar);
        transparentForm.display();
        //window.display();
        //listBox.display();
        //textBox.display();
    }
}
